Imports System.Data.SqlClient
Public Class Warnings
    Public Shared Function GetWarning() As DataTable
        Str = " SELECT WARNING_ID,EMPLOYEE_NAME=ENGLISH_NAME +' ( '+KHMER_NAME+' )',WARNING_DATE,WARNING_ABOUT,DAMAGE_PROPERTY,PUNISHMENT,GM_COMMENT,MODIFY_BY,WARNING_CRITERIA,WARNING_TYPE,OCCUR_DATE,ACTIVE FROM  VIEW_WARNING  WHERE ACTIVE=1 ORDER BY WARNING_ID ASC "

        Try
            Dim dataAdapter As SqlDataAdapter
            dataAdapter = New SqlDataAdapter(Str, CType(Dbinterface.Connection, SqlConnection))
            Dim dataTable As DataTable = New DataTable()
            dataAdapter.Fill(dataTable)
            Return dataTable
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            Return Nothing
        End Try
    End Function

End Class